3.506 \(\int \tan (c+d x) \sqrt {a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=106 \[ \frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \]

[Out]

-arctanh((a+b*tan(d*x+c))^(1/2)/(a-I*b)^(1/2))*(a-I*b)^(1/2)/d-arctanh((a+b*tan(d*x+c))^(1/2)/(a+I*b)^(1/2))*(
a+I*b)^(1/2)/d+2*(a+b*tan(d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3528, 3539, 3537, 63, 208} \[ \frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]*Sqrt[a + b*Tan[c + d*x]],x]

[Out]

-((Sqrt[a - I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]])/d) - (Sqrt[a + I*b]*ArcTanh[Sqrt[a + b*Tan[c
 + d*x]]/Sqrt[a + I*b]])/d + (2*Sqrt[a + b*Tan[c + d*x]])/d

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3537

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c*
d)/f, Subst[Int[(a + (b*x)/d)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3539

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rubi steps

\begin {align*} \int \tan (c+d x) \sqrt {a+b \tan (c+d x)} \, dx &=\frac {2 \sqrt {a+b \tan (c+d x)}}{d}+\int \frac {-b+a \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\\ &=\frac {2 \sqrt {a+b \tan (c+d x)}}{d}+\frac {1}{2} (-i a-b) \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx+\frac {1}{2} (i a-b) \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx\\ &=\frac {2 \sqrt {a+b \tan (c+d x)}}{d}+\frac {(a-i b) \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}+\frac {(a+i b) \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}\\ &=\frac {2 \sqrt {a+b \tan (c+d x)}}{d}-\frac {(i a-b) \operatorname {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}+\frac {(i a+b) \operatorname {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}\\ &=-\frac {\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 \sqrt {a+b \tan (c+d x)}}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 100, normalized size = 0.94 \[ -\frac {-2 \sqrt {a+b \tan (c+d x)}+\sqrt {a-i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )+\sqrt {a+i b} \tanh ^{-1}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]*Sqrt[a + b*Tan[c + d*x]],x]

[Out]

-((Sqrt[a - I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]] + Sqrt[a + I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*
x]]/Sqrt[a + I*b]] - 2*Sqrt[a + b*Tan[c + d*x]])/d)

________________________________________________________________________________________

fricas [B]  time = 0.52, size = 1740, normalized size = 16.42 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))^(1/2)*tan(d*x+c),x, algorithm="fricas")

[Out]

1/4*(4*sqrt(2)*d^5*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*sqrt(b^2/d^4)*((a^2 + b^2)/d^4)^(3/4)*
arctan(-((a^2 + b^2)*d^4*sqrt(b^2/d^4)*sqrt((a^2 + b^2)/d^4) + (a^3 + a*b^2)*d^2*sqrt(b^2/d^4) + sqrt(2)*(d^7*
sqrt(b^2/d^4)*sqrt((a^2 + b^2)/d^4) + a*d^5*sqrt(b^2/d^4))*sqrt((a*cos(d*x + c) + b*sin(d*x + c))/cos(d*x + c)
)*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2 + b^2)/d^4)^(3/4) - sqrt(2)*(d^7*sqrt(b^2/d^4)*sq
rt((a^2 + b^2)/d^4) + a*d^5*sqrt(b^2/d^4))*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*sqrt(((a^2 + b
^2)*d^2*sqrt((a^2 + b^2)/d^4)*cos(d*x + c) + sqrt(2)*(a*d^3*sqrt((a^2 + b^2)/d^4)*cos(d*x + c) + (a^2 + b^2)*d
*cos(d*x + c))*sqrt((a*cos(d*x + c) + b*sin(d*x + c))/cos(d*x + c))*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 -
 b^2)/b^2)*((a^2 + b^2)/d^4)^(1/4) + (a^3 + a*b^2)*cos(d*x + c) + (a^2*b + b^3)*sin(d*x + c))/((a^2 + b^2)*cos
(d*x + c)))*((a^2 + b^2)/d^4)^(3/4))/(a^2*b^2 + b^4)) + 4*sqrt(2)*d^5*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2
 - b^2)/b^2)*sqrt(b^2/d^4)*((a^2 + b^2)/d^4)^(3/4)*arctan(((a^2 + b^2)*d^4*sqrt(b^2/d^4)*sqrt((a^2 + b^2)/d^4)
 + (a^3 + a*b^2)*d^2*sqrt(b^2/d^4) - sqrt(2)*(d^7*sqrt(b^2/d^4)*sqrt((a^2 + b^2)/d^4) + a*d^5*sqrt(b^2/d^4))*s
qrt((a*cos(d*x + c) + b*sin(d*x + c))/cos(d*x + c))*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2
 + b^2)/d^4)^(3/4) + sqrt(2)*(d^7*sqrt(b^2/d^4)*sqrt((a^2 + b^2)/d^4) + a*d^5*sqrt(b^2/d^4))*sqrt(-(a*d^2*sqrt
((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*sqrt(((a^2 + b^2)*d^2*sqrt((a^2 + b^2)/d^4)*cos(d*x + c) - sqrt(2)*(a*d^3*
sqrt((a^2 + b^2)/d^4)*cos(d*x + c) + (a^2 + b^2)*d*cos(d*x + c))*sqrt((a*cos(d*x + c) + b*sin(d*x + c))/cos(d*
x + c))*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2 + b^2)/d^4)^(1/4) + (a^3 + a*b^2)*cos(d*x +
 c) + (a^2*b + b^3)*sin(d*x + c))/((a^2 + b^2)*cos(d*x + c)))*((a^2 + b^2)/d^4)^(3/4))/(a^2*b^2 + b^4)) - sqrt
(2)*(a*d^3*sqrt((a^2 + b^2)/d^4) + (a^2 + b^2)*d)*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2 +
 b^2)/d^4)^(1/4)*log(((a^2 + b^2)*d^2*sqrt((a^2 + b^2)/d^4)*cos(d*x + c) + sqrt(2)*(a*d^3*sqrt((a^2 + b^2)/d^4
)*cos(d*x + c) + (a^2 + b^2)*d*cos(d*x + c))*sqrt((a*cos(d*x + c) + b*sin(d*x + c))/cos(d*x + c))*sqrt(-(a*d^2
*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2 + b^2)/d^4)^(1/4) + (a^3 + a*b^2)*cos(d*x + c) + (a^2*b + b^3)*
sin(d*x + c))/((a^2 + b^2)*cos(d*x + c))) + sqrt(2)*(a*d^3*sqrt((a^2 + b^2)/d^4) + (a^2 + b^2)*d)*sqrt(-(a*d^2
*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2 + b^2)/d^4)^(1/4)*log(((a^2 + b^2)*d^2*sqrt((a^2 + b^2)/d^4)*co
s(d*x + c) - sqrt(2)*(a*d^3*sqrt((a^2 + b^2)/d^4)*cos(d*x + c) + (a^2 + b^2)*d*cos(d*x + c))*sqrt((a*cos(d*x +
 c) + b*sin(d*x + c))/cos(d*x + c))*sqrt(-(a*d^2*sqrt((a^2 + b^2)/d^4) - a^2 - b^2)/b^2)*((a^2 + b^2)/d^4)^(1/
4) + (a^3 + a*b^2)*cos(d*x + c) + (a^2*b + b^3)*sin(d*x + c))/((a^2 + b^2)*cos(d*x + c))) + 8*(a^2 + b^2)*sqrt
((a*cos(d*x + c) + b*sin(d*x + c))/cos(d*x + c)))/((a^2 + b^2)*d)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))^(1/2)*tan(d*x+c),x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [B]  time = 0.22, size = 478, normalized size = 4.51 \[ \frac {2 \sqrt {a +b \tan \left (d x +c \right )}}{d}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d}+\frac {\arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) a}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \sqrt {a^{2}+b^{2}}}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right )}{4 d}-\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) a}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \sqrt {a^{2}+b^{2}}}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(d*x+c))^(1/2)*tan(d*x+c),x)

[Out]

2*(a+b*tan(d*x+c))^(1/2)/d-1/4/d*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^
2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+1/d/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)+(2
*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a-1/d/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b
*tan(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*(a^2+b^2)^(1/2)+1/4/d*(2*(a^2
+b^2)^(1/2)+2*a)^(1/2)*ln((a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)-b*tan(d*x+c)-a-(a^2+b^2)^(1/2))
-1/d/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan(((2*(a^2+b^2)^(1/2)+2*a)^(1/2)-2*(a+b*tan(d*x+c))^(1/2))/(2*(a^2+b^2
)^(1/2)-2*a)^(1/2))*a+1/d/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan(((2*(a^2+b^2)^(1/2)+2*a)^(1/2)-2*(a+b*tan(d*x+c
))^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*(a^2+b^2)^(1/2)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))^(1/2)*tan(d*x+c),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is b-a positive, negative or zero?

________________________________________________________________________________________

mupad [B]  time = 4.79, size = 290, normalized size = 2.74 \[ \frac {2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d}-\mathrm {atan}\left (\frac {b^4\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}+\frac {32\,a\,b^3\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a-b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {b^4\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,32{}\mathrm {i}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}-\frac {32\,a\,b^3\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {b^5\,16{}\mathrm {i}}{d}+\frac {a^2\,b^3\,16{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a+b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)*(a + b*tan(c + d*x))^(1/2),x)

[Out]

(2*(a + b*tan(c + d*x))^(1/2))/d - atan((b^4*(a/(4*d^2) - (b*1i)/(4*d^2))^(1/2)*(a + b*tan(c + d*x))^(1/2)*32i
)/((b^5*16i)/d + (a^2*b^3*16i)/d) + (32*a*b^3*(a/(4*d^2) - (b*1i)/(4*d^2))^(1/2)*(a + b*tan(c + d*x))^(1/2))/(
(b^5*16i)/d + (a^2*b^3*16i)/d))*((a - b*1i)/(4*d^2))^(1/2)*2i + atan((b^4*(a/(4*d^2) + (b*1i)/(4*d^2))^(1/2)*(
a + b*tan(c + d*x))^(1/2)*32i)/((b^5*16i)/d + (a^2*b^3*16i)/d) - (32*a*b^3*(a/(4*d^2) + (b*1i)/(4*d^2))^(1/2)*
(a + b*tan(c + d*x))^(1/2))/((b^5*16i)/d + (a^2*b^3*16i)/d))*((a + b*1i)/(4*d^2))^(1/2)*2i

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \tan {\left (c + d x \right )}} \tan {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(d*x+c))**(1/2)*tan(d*x+c),x)

[Out]

Integral(sqrt(a + b*tan(c + d*x))*tan(c + d*x), x)

________________________________________________________________________________________